﻿//(function ($) {
    var img = $("<img id=\"progressImgage\"  src=\"/lccrm/Scripts/AjaxLoading/img/LoadingPng2.gif\"/>"); //Loading小图标
    var mask = $("<div id=\"maskOfProgressImage\"></div>").addClass("mask").addClass("hide"); //Div遮罩
    function MaskShow(aimDivObj) {
        //var img = $("<img id=\"progressImgage\"  src=\"/CRMSite/Scripts/AjaxLoading/img/LoadingPng.gif\" />"); //Loading小图标
        //var mask = $("<div id=\"maskOfProgressImage\"></div>").addClass("mask").addClass("hide"); //Div遮罩
        var PositionStyle = "fixed";
        //是否将Loading固定在aimDiv中操作,否则默认为全屏Loading遮罩
        if (aimDivObj != null && aimDivObj != "" && aimDivObj != undefined) {
            $(aimDivObj).css("position", "relative").append(img).append(mask);
            PositionStyle = "absolute";
        }
        else {
            $("body").append(img).append(mask);
        }
        img.css({
            "z-index": "2000",
            "display": "none"
        })
        mask.css({
            "position": PositionStyle,
            "top": "0",
            "right": "0",
            "bottom": "0",
            "left": "0",
            "z-index": "1000",
            "background-color": "#000000",
            "display": "none"
        });
        img.show().css({
            "position": PositionStyle,
            "top": "50%",
            "left": "50%",
            "margin-top": function () { return -1 * img.height() / 2; },
            "margin-left": function () { return -1 * img.width() / 2; }
        });
        mask.show().css("opacity", "0.1");

        mask.hide();
    };
    function MaskHide() {
       // var mask = $("<div id=\"maskOfProgressImage\"></div>").addClass("mask").addClass("hide"); //Div遮罩
        mask.hide();
        img.hide();
    };
//})(jQuery);
